﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="script/angular/angular.min.js"></script>
    <script src="script/angular/angular-translate.js"></script>
    <script src="script/angular/angular-translate-loader-static-files.js"></script>

</head>
<body ng-app="app">
    <div ng-controller="PlanImportController">
        <h1>{{ 'Hello' | translate:'{name:"萨达打算"}' }}</h1>
        <span translate='what? A dog.'></span>
    </div>
    <script type="text/javascript">
        var app = angular.module("app", ['pascalprecht.translate']);

        app.config(['$translateProvider', function ($translateProvider) {

            let lang;
            if (window.localStorage.lang === undefined || window.localStorage.lang === 'undefined') {
                lang = 'cn'
            } else {
                lang = window.localStorage.lang;
            }

            $translateProvider.useStaticFilesLoader({
                prefix: '/i18n/',
                suffix: '.json'
            });
            $translateProvider.preferredLanguage(lang);
        }]);

        
    </script>
    <script>

        angular.module('app').controller('PlanImportController', ['$translate',
            function ($translate) {
                var a = 1;

            }]);

    </script>
</body>
</html>